﻿<Activity mc:Ignorable="sads sap" x:Class="TfsCloudDeploy.Workflow.Core.MultiBuildRunner.Process" this:Process.Verbosity="[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]" this:Process.BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" this:Process.SupportedReasons="All" this:Process.RunBuildsInParallel="False" this:Process.StopOnFirstFailedBuild="False" this:Process.AllowPartiallySuccessfulBuilds="True" this:Process.MaxConsecutiveFailuresWhileWaitingForCompletion="3" this:Process.ThrowOnErrorInSpawnedBuild="True" this:Process.RefreshIntervalInSeconds="60" this:Process.MaxExecutionTimeForMasterBuildInMinutes="0" this:Process.AgentSettingsNameFilter="*" this:Process.MaxWaitTimeForChildBuildToCompleteInMinutes="0" this:Process.MaxWaitTimeForMasterBuildInMinutes="0"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client"
 xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtbwt1="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow"
 xmlns:mtlwa="clr-namespace:Microsoft.TeamFoundation.Lab.Workflow.Activities;assembly=Microsoft.TeamFoundation.Lab.Workflow.Activities"
 xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:sad="clr-namespace:System.Activities.Debugger;assembly=System.Activities"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:this="clr-namespace:TfsCloudDeploy.Workflow.Core.MultiBuildRunner"
 xmlns:twca="clr-namespace:TfsCloudDeploy.Workflow.Core.Activities;assembly=TfsCloudDeploy.Workflow.Core"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
    <x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
    <x:Property Name="BuildNumberFormat" Type="InArgument(x:String)" />
    <x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
    <x:Property Name="BuildsToRun" Type="InArgument(s:String[])" />
    <x:Property Name="RunBuildsInParallel" Type="InArgument(x:Boolean)" />
    <x:Property Name="StopOnFirstFailedBuild" Type="InArgument(x:Boolean)" />
    <x:Property Name="AllowPartiallySuccessfulBuilds" Type="InArgument(x:Boolean)" />
    <x:Property Name="MaxConsecutiveFailuresWhileWaitingForCompletion" Type="InArgument(x:Int32)" />
    <x:Property Name="ThrowOnErrorInSpawnedBuild" Type="InArgument(x:Boolean)" />
    <x:Property Name="RefreshIntervalInSeconds" Type="InArgument(x:Int32)" />
    <x:Property Name="MaxExecutionTimeForMasterBuildInMinutes" Type="InArgument(x:Int32)" />
    <x:Property Name="AgentSettingsNameFilter" Type="InArgument(x:String)" />
    <x:Property Name="AgentSettingsTagFilter" Type="InArgument(x:String)" />
    <x:Property Name="AgentSettingsTagComparisonOperator" Type="InArgument(mtbwa:TagComparison)" />
    <x:Property Name="MaxWaitTimeForChildBuildToCompleteInMinutes" Type="InArgument(x:Int32)" />
    <x:Property Name="MaxWaitTimeForMasterBuildInMinutes" Type="InArgument(x:Int32)" />
    <x:Property Name="GetVersion" Type="InArgument(x:String)" />
  </x:Members>
  <this:Process.Metadata>
    <mtbw:ProcessParameterMetadataCollection>
      <mtbw:ProcessParameterMetadata Category="Multiple Builds Configuration" Description="Enter the names of the builds to be executed by this build, one per line. You can optionally specify additional parameters per build. To do this, you would need to specify a pipe-delimited (|) list like the following: MyBuildName|BuildController=MySecondController|TeamProject=TeamProj25|GetVersion=C21345|RequestedFor=MYDOMAIN\TestUser|Priority=High. The following optional paramters can be specified: BuildController (name of build controller on which the build definition is configured -- build account must have permission to queue a build against that controller), TeamProject (name of the team project on which the build definition is defined), GetVersion (custom version to get instead of latest), RequestedFor (user for whom the build is requested), and Priority (custom priority to specify for the queued build -- default is Normal priority and available options are: Low, BelowNormal, Normal, AboveNormal, and High)." DisplayName="Builds to Run" ParameterName="BuildsToRun" />
      <mtbw:ProcessParameterMetadata Category="Multiple Builds Configuration" Description="Set to True to have the builds spawned in parallel. By default they are spawned sequentially." DisplayName="Run Builds in Parallel" ParameterName="RunBuildsInParallel" />
      <mtbw:ProcessParameterMetadata Category="Multiple Builds Configuration" Description="Set to True to stop this build when the first child build fails. Note that this option only affects builds being run sequentially and does not affect builds running in parallel." DisplayName="Stop on First Failed Child Build" ParameterName="StopOnFirstFailedBuild" />
      <mtbw:ProcessParameterMetadata Category="Multiple Builds Configuration" Description="Set to True to allow partially successful builds to go through." DisplayName="Allow Partially Successful Child Builds" ParameterName="AllowPartiallySuccessfulBuilds" />
      <mtbw:ProcessParameterMetadata Category="Multiple Builds Configuration" Description="The interval in seconds for refreshing the parent build about the status of the child builds." DisplayName="Refresh Interval in Seconds" ParameterName="RefreshIntervalInSeconds" />
      <mtbw:ProcessParameterMetadata Category="Multiple Builds Configuration" Description="The maximum number of failures in a child build to tolerate before declaring it a failed build." DisplayName="Max Consecutive Failures While Waiting For Completion" ParameterName="MaxConsecutiveFailuresWhileWaitingForCompletion" />
      <mtbw:ProcessParameterMetadata Category="Multiple Builds Configuration" Description="Throw an error when an error is thrown in the child build." DisplayName="Throw on Error in Spawned Build" ParameterName="ThrowOnErrorInSpawnedBuild" />
      <mtbw:ProcessParameterMetadata Category="Multiple Builds Configuration" Description="The maximum amount of time in minutes to wait for a child build to complete before giving up and cancelling it. The default, 0, indicates an infinite wait time." DisplayName="Maximum Wait Time For Child Build to Complete in Minutes" ParameterName="MaxWaitTimeForChildBuildToCompleteInMinutes" />
      <mtbw:ProcessParameterMetadata Category="Agent Settings" Description="The maximum amount of time in minutes to wait for the master (parent) build to acquire and agent. The default, 0, indicates an infinite wait time." DisplayName="Maximum Wait Time For Master Build in Minutes" ParameterName="MaxWaitTimeForMasterBuildInMinutes" />
      <mtbw:ProcessParameterMetadata Category="Agent Settings" Description="The filter to use to restrict the selection of agent by their name." DisplayName="Agent Name Filter" ParameterName="AgentSettingsNameFilter" />
      <mtbw:ProcessParameterMetadata Category="Agent Settings" Description="A comma-separated list of Tags to be used in determining the appropriate agent for running the build on." DisplayName="Agent Tag Filter" ParameterName="AgentSettingsTagFilter" />
      <mtbw:ProcessParameterMetadata Category="Agent Settings" DisplayName="Agent Tag Comparison Operator" ParameterName="AgentSettingsTagComparisonOperator" />
      <mtbw:ProcessParameterMetadata Category="Agent Settings" Description="The maximum amount of time in minutes to wait for the master (parent) build to complete execution. The default, 0, indicates an infinite wait time." DisplayName="Maximum Execution Time For Master Build in Minutes" ParameterName="MaxExecutionTimeForMasterBuildInMinutes" />
    </mtbw:ProcessParameterMetadataCollection>
  </this:Process.Metadata>
  <this:Process.AgentSettingsTagFilter>
    <InArgument x:TypeArguments="x:String">
      <Literal x:TypeArguments="x:String" Value="" />
    </InArgument>
  </this:Process.AgentSettingsTagFilter>
  <sap:VirtualizedContainerService.HintSize>2302,5820</sap:VirtualizedContainerService.HintSize>
  <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
  <sap:WorkflowViewStateService.ViewState>
    <scg:Dictionary x:TypeArguments="x:String, x:Object">
      <x:Boolean x:Key="ShouldExpandAll">True</x:Boolean>
      <x:Boolean x:Key="ShouldCollapseAll">False</x:Boolean>
    </scg:Dictionary>
  </sap:WorkflowViewStateService.ViewState>
  <Sequence sad:XamlDebuggerXmlReader.FileName="F:\CodePlex\TfsCloudDeploy\Dev\TfsCloudDeploy\Workflow.Tests\Templates\Custom\TfsCloudDeploy.MultiBuildRunnerTemplate.xaml" sap:VirtualizedContainerService.HintSize="2262,5780" mtbwt1:BuildTrackingParticipant.Importance="None" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
    <Sequence.Variables>
      <Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
      <Variable x:TypeArguments="x:String" Name="BuildNumber" />
      <Variable x:TypeArguments="mtbwa:AgentReservationSpec" Default="[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentReservationSpec()]" Name="MasterAgentReservationSpec" />
    </Sequence.Variables>
    <sap:WorkflowViewStateService.ViewState>
      <scg:Dictionary x:TypeArguments="x:String, x:Object">
        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
      </scg:Dictionary>
    </sap:WorkflowViewStateService.ViewState>
    <mtbwa:UpdateBuildNumber BuildNumberFormat="[BuildNumberFormat]" DisplayName="Update Build Number" sap:VirtualizedContainerService.HintSize="2240,22" />
    <mtbwa:GetBuildDetail DisplayName="Get Build Details" sap:VirtualizedContainerService.HintSize="2240,22" mtbwt1:BuildTrackingParticipant.Importance="Low" Result="[BuildDetail]" />
    <Assign sap:VirtualizedContainerService.HintSize="2240,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
      <Assign.To>
        <OutArgument x:TypeArguments="mtbwa:StringList">[MasterAgentReservationSpec.Tags]</OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="mtbwa:StringList">[New StringList(AgentSettingsTagFilter)]</InArgument>
      </Assign.Value>
    </Assign>
    <Assign sap:VirtualizedContainerService.HintSize="2240,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
      <Assign.To>
        <OutArgument x:TypeArguments="x:String">[MasterAgentReservationSpec.Name]</OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="x:String">[AgentSettingsNameFilter]</InArgument>
      </Assign.Value>
    </Assign>
    <Assign sap:VirtualizedContainerService.HintSize="2240,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
      <Assign.To>
        <OutArgument x:TypeArguments="mtbwa:TagComparison">[MasterAgentReservationSpec.TagComparison]</OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="mtbwa:TagComparison">[AgentSettingsTagComparisonOperator]</InArgument>
      </Assign.Value>
    </Assign>
    <mtbwa:AgentScope DisplayName="Run Master Build" sap:VirtualizedContainerService.HintSize="2240,5046" MaxExecutionTime="[System.TimeSpan.FromMinutes(MaxExecutionTimeForMasterBuildInMinutes)]" MaxWaitTime="[System.TimeSpan.FromMinutes(MaxWaitTimeForMasterBuildInMinutes)]" ReservationSpec="[MasterAgentReservationSpec]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces">
      <mtbwa:AgentScope.Variables>
        <Variable x:TypeArguments="x:Int32" Default="0" Name="NumberOfFailedBuilds" />
      </mtbwa:AgentScope.Variables>
      <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="2218,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;{0} Builds Found.&quot;, If(Not (BuildsToRun Is Nothing) AndAlso BuildsToRun.Length &gt; 0, BuildsToRun.Length, 0))]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
      <TryCatch sap:VirtualizedContainerService.HintSize="2218,4860" mtbwt1:BuildTrackingParticipant.Importance="Low">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
        <TryCatch.Try>
          <If Condition="[Not (BuildsToRun Is Nothing) AndAlso BuildsToRun.Length &gt; 0]" DisplayName="If There Are Builds To Run" sap:VirtualizedContainerService.HintSize="2200,4055" mtbwt1:BuildTrackingParticipant.Importance="Low">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                <x:Boolean x:Key="IsPinned">False</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <If.Then>
              <If Condition="[RunBuildsInParallel]" DisplayName="If Builds Should Be Run In Parallel" sap:VirtualizedContainerService.HintSize="1975,3947" mtbwt1:BuildTrackingParticipant.Importance="Low">
                <If.Then>
                  <Sequence sap:VirtualizedContainerService.HintSize="975,3297" mtbwt1:BuildTrackingParticipant.Importance="Low">
                    <sap:WorkflowViewStateService.ViewState>
                      <scg:Dictionary x:TypeArguments="x:String, x:Object">
                        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                      </scg:Dictionary>
                    </sap:WorkflowViewStateService.ViewState>
                    <ParallelForEach x:TypeArguments="x:String" DisplayName="ParallelForEach&lt;String&gt;" sap:VirtualizedContainerService.HintSize="953,3173" mtbwt1:BuildTrackingParticipant.Importance="Low" Values="[BuildsToRun]">
                      <ActivityAction x:TypeArguments="x:String">
                        <ActivityAction.Argument>
                          <DelegateInArgument x:TypeArguments="x:String" Name="buildDefinitionName" />
                        </ActivityAction.Argument>
                        <Sequence sap:VirtualizedContainerService.HintSize="923,3065" mtbwt1:BuildTrackingParticipant.Importance="Low">
                          <sap:WorkflowViewStateService.ViewState>
                            <scg:Dictionary x:TypeArguments="x:String, x:Object">
                              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                            </scg:Dictionary>
                          </sap:WorkflowViewStateService.ViewState>
                          <TryCatch sap:VirtualizedContainerService.HintSize="901,2941" mtbwt1:BuildTrackingParticipant.Importance="Low">
                            <TryCatch.Try>
                              <Sequence sap:VirtualizedContainerService.HintSize="883,2392" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                <Sequence.Variables>
                                  <Variable x:TypeArguments="x:Int32" Name="QueueBuildId" />
                                  <Variable x:TypeArguments="mtbc:BuildStatus" Default="[Microsoft.TeamFoundation.Build.Client.BuildStatus.Succeeded]" Name="BuildStatus" />
                                  <Variable x:TypeArguments="mtbc:IBuildDetail" Name="ChildBuildDetail" />
                                  <Variable x:TypeArguments="mtbc:IBuildDetail" Name="SelectedBuildDetail" />
                                  <Variable x:TypeArguments="x:String" Name="ExtractedBuildName">
                                    <Variable.Default>
                                      <Literal x:TypeArguments="x:String" Value="" />
                                    </Variable.Default>
                                  </Variable>
                                  <Variable x:TypeArguments="x:String" Name="ExtractedControllerName" />
                                  <Variable x:TypeArguments="x:String" Default="[BuildDetail.TeamProject]" Name="ExtractedTeamProjectName" />
                                  <Variable x:TypeArguments="x:String" Default="[GetVersion]" Name="ExtractedGetVersion" />
                                  <Variable x:TypeArguments="x:String" Default="Normal" Name="ExtractedPriority" />
                                  <Variable x:TypeArguments="x:String" Default="[BuildDetail.RequestedBy]" Name="ExtractedRequestedFor" />
                                </Sequence.Variables>
                                <sap:WorkflowViewStateService.ViewState>
                                  <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                    <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                    <x:Boolean x:Key="IsPinned">False</x:Boolean>
                                  </scg:Dictionary>
                                </sap:WorkflowViewStateService.ViewState>
                                <Sequence sap:VirtualizedContainerService.HintSize="861,2020" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                  <Sequence.Variables>
                                    <Variable x:TypeArguments="s:String[]" Name="BuildProperties" />
                                    <Variable x:TypeArguments="s:String[]" Name="BuildProperty" />
                                  </Sequence.Variables>
                                  <sap:WorkflowViewStateService.ViewState>
                                    <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                      <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                      <x:Boolean x:Key="IsPinned">False</x:Boolean>
                                    </scg:Dictionary>
                                  </sap:WorkflowViewStateService.ViewState>
                                  <Assign sap:VirtualizedContainerService.HintSize="839,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                    <Assign.To>
                                      <OutArgument x:TypeArguments="s:String[]">[BuildProperties]</OutArgument>
                                    </Assign.To>
                                    <Assign.Value>
                                      <InArgument x:TypeArguments="s:String[]">[buildDefinitionName.Split(New Char() {"|"c}, StringSplitOptions.RemoveEmptyEntries)]</InArgument>
                                    </Assign.Value>
                                  </Assign>
                                  <ForEach x:TypeArguments="x:String" DisplayName="ForEach&lt;String&gt;" sap:VirtualizedContainerService.HintSize="839,1424" mtbwt1:BuildTrackingParticipant.Importance="Low" Values="[BuildProperties]">
                                    <sap:WorkflowViewStateService.ViewState>
                                      <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                        <x:Boolean x:Key="IsPinned">False</x:Boolean>
                                      </scg:Dictionary>
                                    </sap:WorkflowViewStateService.ViewState>
                                    <ActivityAction x:TypeArguments="x:String">
                                      <ActivityAction.Argument>
                                        <DelegateInArgument x:TypeArguments="x:String" Name="buildPropertyEntry" />
                                      </ActivityAction.Argument>
                                      <Sequence sap:VirtualizedContainerService.HintSize="809,1316" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                        <sap:WorkflowViewStateService.ViewState>
                                          <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                          </scg:Dictionary>
                                        </sap:WorkflowViewStateService.ViewState>
                                        <Assign sap:VirtualizedContainerService.HintSize="787,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                          <Assign.To>
                                            <OutArgument x:TypeArguments="s:String[]">[BuildProperty]</OutArgument>
                                          </Assign.To>
                                          <Assign.Value>
                                            <InArgument x:TypeArguments="s:String[]">[buildPropertyEntry.Split(New Char() {"="c}, StringSplitOptions.RemoveEmptyEntries)]</InArgument>
                                          </Assign.Value>
                                        </Assign>
                                        <If Condition="[BuildProperty.Length &gt; 1]" sap:VirtualizedContainerService.HintSize="787,1092" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                          <If.Then>
                                            <Sequence sap:VirtualizedContainerService.HintSize="498,984" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                              <sap:WorkflowViewStateService.ViewState>
                                                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                                  <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                                </scg:Dictionary>
                                              </sap:WorkflowViewStateService.ViewState>
                                              <Switch x:TypeArguments="x:String" Expression="[BuildProperty(0).ToLower().Trim()]" sap:VirtualizedContainerService.HintSize="476,860" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                <Assign x:Key="buildcontroller" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedControllerName]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                                <Assign x:Key="teamproject" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedTeamProjectName]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                                <Assign x:Key="requestedfor" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedRequestedFor]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                                <Assign x:Key="priority" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedPriority]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                                <Assign x:Key="getversion" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedGetVersion]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                              </Switch>
                                            </Sequence>
                                          </If.Then>
                                          <If.Else>
                                            <Sequence sap:VirtualizedContainerService.HintSize="264,184" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                              <sap:WorkflowViewStateService.ViewState>
                                                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                                  <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                                </scg:Dictionary>
                                              </sap:WorkflowViewStateService.ViewState>
                                              <Assign sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                <Assign.To>
                                                  <OutArgument x:TypeArguments="x:String">[ExtractedBuildName]</OutArgument>
                                                </Assign.To>
                                                <Assign.Value>
                                                  <InArgument x:TypeArguments="x:String">[BuildProperty(0)]</InArgument>
                                                </Assign.Value>
                                              </Assign>
                                            </Sequence>
                                          </If.Else>
                                        </If>
                                      </Sequence>
                                    </ActivityAction>
                                  </ForEach>
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Build Name: '{0}'.&quot;, ExtractedBuildName)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Controller Name: '{0}'.&quot;, ExtractedControllerName)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Get Version: '{0}'.&quot;, ExtractedGetVersion)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Priority: '{0}'.&quot;, ExtractedPriority)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Requested For: '{0}'.&quot;, ExtractedRequestedFor)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Team Project Name: '{0}'.&quot;, ExtractedTeamProjectName)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                </Sequence>
                                <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="861,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;Building '{0}'...&quot;, ExtractedBuildName)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                <twca:RunWorkflow BuildController="[ExtractedControllerName]" BuildDefinition="[ExtractedBuildName]" CustomGetVersion="[ExtractedGetVersion]" DisplayName="Queue a Build" sap:VirtualizedContainerService.HintSize="861,22" mtbwt1:BuildTrackingParticipant.Importance="Low" Priority="[CType([Enum].Parse(GetType(QueuePriority), ExtractedPriority), QueuePriority)]" ProjectName="[ExtractedTeamProjectName]" RequestedFor="[ExtractedRequestedFor]" Result="[QueueBuildId]" />
                                <mtlwa:WaitForWorkflow AllowPartiallySucceededBuild="[AllowPartiallySuccessfulBuilds]" BuildDetails="[ChildBuildDetail]" DisplayName="Waiting for the queued build to finish..." sap:VirtualizedContainerService.HintSize="861,22" LabWorkflowType="[Microsoft.TeamFoundation.Lab.Workflow.Activities.WorkflowType.Build]" MaxConsecutiveFailuresToIgnoreDuringWaitForCompletion="[MaxConsecutiveFailuresWhileWaitingForCompletion]" MaxWaitTime="[System.TimeSpan.FromMinutes(MaxWaitTimeForChildBuildToCompleteInMinutes)]" QueueBuildId="[QueueBuildId]" RefreshInterval="[System.TimeSpan.FromSeconds(RefreshIntervalInSeconds)]" Result="[BuildStatus]" ThrowOnError="[ThrowOnErrorInSpawnedBuild]" />
                                <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="861,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;Finished building '{0}'. Status: {1}.&quot;, ExtractedBuildName, BuildStatus)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                              </Sequence>
                            </TryCatch.Try>
                            <TryCatch.Catches>
                              <Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="887,279">
                                <sap:WorkflowViewStateService.ViewState>
                                  <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                    <x:Boolean x:Key="IsExpanded">False</x:Boolean>
                                    <x:Boolean x:Key="IsPinned">False</x:Boolean>
                                  </scg:Dictionary>
                                </sap:WorkflowViewStateService.ViewState>
                                <ActivityAction x:TypeArguments="s:Exception">
                                  <ActivityAction.Argument>
                                    <DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
                                  </ActivityAction.Argument>
                                  <Sequence sap:VirtualizedContainerService.HintSize="264,246" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                    <sap:WorkflowViewStateService.ViewState>
                                      <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                      </scg:Dictionary>
                                    </sap:WorkflowViewStateService.ViewState>
                                    <Assign sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                      <Assign.To>
                                        <OutArgument x:TypeArguments="x:Int32">[NumberOfFailedBuilds]</OutArgument>
                                      </Assign.To>
                                      <Assign.Value>
                                        <InArgument x:TypeArguments="x:Int32">[NumberOfFailedBuilds + 1]</InArgument>
                                      </Assign.Value>
                                    </Assign>
                                    <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="242,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;Build '{0}' failed. Error message: {1}&quot;, buildDefinitionName, exception.Message)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  </Sequence>
                                </ActivityAction>
                              </Catch>
                            </TryCatch.Catches>
                          </TryCatch>
                        </Sequence>
                      </ActivityAction>
                    </ParallelForEach>
                  </Sequence>
                </If.Then>
                <If.Else>
                  <Sequence sap:VirtualizedContainerService.HintSize="975,3839" mtbwt1:BuildTrackingParticipant.Importance="Low">
                    <sap:WorkflowViewStateService.ViewState>
                      <scg:Dictionary x:TypeArguments="x:String, x:Object">
                        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                      </scg:Dictionary>
                    </sap:WorkflowViewStateService.ViewState>
                    <ForEach x:TypeArguments="x:String" DisplayName="ForEach&lt;String&gt;" sap:VirtualizedContainerService.HintSize="953,3715" mtbwt1:BuildTrackingParticipant.Importance="Low" Values="[BuildsToRun]">
                      <ActivityAction x:TypeArguments="x:String">
                        <ActivityAction.Argument>
                          <DelegateInArgument x:TypeArguments="x:String" Name="buildDefinitionName" />
                        </ActivityAction.Argument>
                        <Sequence sap:VirtualizedContainerService.HintSize="923,3607" mtbwt1:BuildTrackingParticipant.Importance="Low">
                          <sap:WorkflowViewStateService.ViewState>
                            <scg:Dictionary x:TypeArguments="x:String, x:Object">
                              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                            </scg:Dictionary>
                          </sap:WorkflowViewStateService.ViewState>
                          <TryCatch sap:VirtualizedContainerService.HintSize="901,3483" mtbwt1:BuildTrackingParticipant.Importance="Low">
                            <TryCatch.Try>
                              <Sequence sap:VirtualizedContainerService.HintSize="883,2640" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                <Sequence.Variables>
                                  <Variable x:TypeArguments="x:Int32" Name="QueueBuildId" />
                                  <Variable x:TypeArguments="mtbc:BuildStatus" Default="[Microsoft.TeamFoundation.Build.Client.BuildStatus.Succeeded]" Name="BuildStatus" />
                                  <Variable x:TypeArguments="mtbc:IBuildDetail" Name="ChildBuildDetail" />
                                  <Variable x:TypeArguments="mtbc:IBuildDetail" Name="SelectedBuildDetail" />
                                  <Variable x:TypeArguments="x:String" Name="ExtractedBuildName">
                                    <Variable.Default>
                                      <Literal x:TypeArguments="x:String" Value="" />
                                    </Variable.Default>
                                  </Variable>
                                  <Variable x:TypeArguments="x:String" Name="ExtractedControllerName" />
                                  <Variable x:TypeArguments="x:String" Default="[BuildDetail.TeamProject]" Name="ExtractedTeamProjectName" />
                                  <Variable x:TypeArguments="x:String" Default="[GetVersion]" Name="ExtractedGetVersion" />
                                  <Variable x:TypeArguments="x:String" Default="Normal" Name="ExtractedPriority" />
                                  <Variable x:TypeArguments="x:String" Default="[BuildDetail.RequestedFor]" Name="ExtractedRequestedFor" />
                                </Sequence.Variables>
                                <sap:WorkflowViewStateService.ViewState>
                                  <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                    <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                    <x:Boolean x:Key="IsPinned">False</x:Boolean>
                                  </scg:Dictionary>
                                </sap:WorkflowViewStateService.ViewState>
                                <Sequence sap:VirtualizedContainerService.HintSize="861,2020" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                  <Sequence.Variables>
                                    <Variable x:TypeArguments="s:String[]" Name="BuildProperties" />
                                    <Variable x:TypeArguments="s:String[]" Name="BuildProperty" />
                                  </Sequence.Variables>
                                  <sap:WorkflowViewStateService.ViewState>
                                    <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                      <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                      <x:Boolean x:Key="IsPinned">False</x:Boolean>
                                    </scg:Dictionary>
                                  </sap:WorkflowViewStateService.ViewState>
                                  <Assign sap:VirtualizedContainerService.HintSize="839,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                    <Assign.To>
                                      <OutArgument x:TypeArguments="s:String[]">[BuildProperties]</OutArgument>
                                    </Assign.To>
                                    <Assign.Value>
                                      <InArgument x:TypeArguments="s:String[]">[buildDefinitionName.Split(New Char() {"|"c}, StringSplitOptions.RemoveEmptyEntries)]</InArgument>
                                    </Assign.Value>
                                  </Assign>
                                  <ForEach x:TypeArguments="x:String" DisplayName="ForEach&lt;String&gt;" sap:VirtualizedContainerService.HintSize="839,1424" mtbwt1:BuildTrackingParticipant.Importance="Low" Values="[BuildProperties]">
                                    <sap:WorkflowViewStateService.ViewState>
                                      <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                        <x:Boolean x:Key="IsPinned">False</x:Boolean>
                                      </scg:Dictionary>
                                    </sap:WorkflowViewStateService.ViewState>
                                    <ActivityAction x:TypeArguments="x:String">
                                      <ActivityAction.Argument>
                                        <DelegateInArgument x:TypeArguments="x:String" Name="buildPropertyEntry" />
                                      </ActivityAction.Argument>
                                      <Sequence sap:VirtualizedContainerService.HintSize="809,1316" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                        <sap:WorkflowViewStateService.ViewState>
                                          <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                          </scg:Dictionary>
                                        </sap:WorkflowViewStateService.ViewState>
                                        <Assign sap:VirtualizedContainerService.HintSize="787,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                          <Assign.To>
                                            <OutArgument x:TypeArguments="s:String[]">[BuildProperty]</OutArgument>
                                          </Assign.To>
                                          <Assign.Value>
                                            <InArgument x:TypeArguments="s:String[]">[buildPropertyEntry.Split(New Char() {"="c}, StringSplitOptions.RemoveEmptyEntries)]</InArgument>
                                          </Assign.Value>
                                        </Assign>
                                        <If Condition="[BuildProperty.Length &gt; 1]" sap:VirtualizedContainerService.HintSize="787,1092" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                          <If.Then>
                                            <Sequence sap:VirtualizedContainerService.HintSize="498,984" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                              <sap:WorkflowViewStateService.ViewState>
                                                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                                  <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                                </scg:Dictionary>
                                              </sap:WorkflowViewStateService.ViewState>
                                              <Switch x:TypeArguments="x:String" Expression="[BuildProperty(0).ToLower().Trim()]" sap:VirtualizedContainerService.HintSize="476,860" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                <sap:WorkflowViewStateService.ViewState>
                                                  <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                                    <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                                    <x:Boolean x:Key="IsPinned">False</x:Boolean>
                                                  </scg:Dictionary>
                                                </sap:WorkflowViewStateService.ViewState>
                                                <Assign x:Key="buildcontroller" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedControllerName]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                                <Assign x:Key="teamproject" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedTeamProjectName]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                                <Assign x:Key="requestedfor" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedRequestedFor]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                                <Assign x:Key="priority" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedPriority]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                                <Assign x:Key="getversion" sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                  <Assign.To>
                                                    <OutArgument x:TypeArguments="x:String">[ExtractedGetVersion]</OutArgument>
                                                  </Assign.To>
                                                  <Assign.Value>
                                                    <InArgument x:TypeArguments="x:String">[BuildProperty(1).Trim()]</InArgument>
                                                  </Assign.Value>
                                                </Assign>
                                              </Switch>
                                            </Sequence>
                                          </If.Then>
                                          <If.Else>
                                            <Sequence sap:VirtualizedContainerService.HintSize="264,184" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                              <sap:WorkflowViewStateService.ViewState>
                                                <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                                  <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                                </scg:Dictionary>
                                              </sap:WorkflowViewStateService.ViewState>
                                              <Assign sap:VirtualizedContainerService.HintSize="242,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                                <Assign.To>
                                                  <OutArgument x:TypeArguments="x:String">[ExtractedBuildName]</OutArgument>
                                                </Assign.To>
                                                <Assign.Value>
                                                  <InArgument x:TypeArguments="x:String">[BuildProperty(0)]</InArgument>
                                                </Assign.Value>
                                              </Assign>
                                            </Sequence>
                                          </If.Else>
                                        </If>
                                      </Sequence>
                                    </ActivityAction>
                                  </ForEach>
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Build Name: '{0}'.&quot;, ExtractedBuildName)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Controller Name: '{0}'.&quot;, ExtractedControllerName)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Get Version: '{0}'.&quot;, ExtractedGetVersion)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Priority: '{0}'.&quot;, ExtractedPriority)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Requested For: '{0}'.&quot;, ExtractedRequestedFor)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                  <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="839,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;--&gt; Team Project Name: '{0}'.&quot;, ExtractedTeamProjectName)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                </Sequence>
                                <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="861,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;Building '{0}'...&quot;, ExtractedBuildName)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                <twca:RunWorkflow BuildController="[ExtractedControllerName]" BuildDefinition="[ExtractedBuildName]" CustomGetVersion="[ExtractedGetVersion]" DisplayName="Queue a Build" sap:VirtualizedContainerService.HintSize="861,22" mtbwt1:BuildTrackingParticipant.Importance="Low" Priority="[CType([Enum].Parse(GetType(QueuePriority), ExtractedPriority), QueuePriority)]" ProjectName="[ExtractedTeamProjectName]" RequestedFor="[ExtractedRequestedFor]" Result="[QueueBuildId]" />
                                <mtlwa:WaitForWorkflow AllowPartiallySucceededBuild="[AllowPartiallySuccessfulBuilds]" BuildDetails="[ChildBuildDetail]" DisplayName="Waiting for the queued build to finish..." sap:VirtualizedContainerService.HintSize="861,22" LabWorkflowType="[Microsoft.TeamFoundation.Lab.Workflow.Activities.WorkflowType.Build]" MaxConsecutiveFailuresToIgnoreDuringWaitForCompletion="[MaxConsecutiveFailuresWhileWaitingForCompletion]" MaxWaitTime="[System.TimeSpan.FromMinutes(MaxWaitTimeForChildBuildToCompleteInMinutes)]" QueueBuildId="[QueueBuildId]" RefreshInterval="[System.TimeSpan.FromSeconds(RefreshIntervalInSeconds)]" Result="[BuildStatus]" ThrowOnError="[ThrowOnErrorInSpawnedBuild]" />
                                <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="861,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;Finished building '{0}'. Status: {1}.&quot;, ExtractedBuildName, BuildStatus)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                <If Condition="[BuildStatus &lt;&gt; Build.Client.BuildStatus.Succeeded]" DisplayName="If Build is Not Successful" sap:VirtualizedContainerService.HintSize="464,208" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                  <If.Then>
                                    <Throw Exception="[New Exception(String.Format(&quot;Build '{0}' was not successful. Build Status: {1}.&quot;, buildDefinitionName, BuildStatus.ToString()))]" sap:VirtualizedContainerService.HintSize="200,22" mtbwt1:BuildTrackingParticipant.Importance="Low" />
                                  </If.Then>
                                </If>
                              </Sequence>
                            </TryCatch.Try>
                            <TryCatch.Catches>
                              <Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="887,573">
                                <sap:WorkflowViewStateService.ViewState>
                                  <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                    <x:Boolean x:Key="IsExpanded">False</x:Boolean>
                                    <x:Boolean x:Key="IsPinned">False</x:Boolean>
                                  </scg:Dictionary>
                                </sap:WorkflowViewStateService.ViewState>
                                <ActivityAction x:TypeArguments="s:Exception">
                                  <ActivityAction.Argument>
                                    <DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
                                  </ActivityAction.Argument>
                                  <Sequence sap:VirtualizedContainerService.HintSize="486,540" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                    <sap:WorkflowViewStateService.ViewState>
                                      <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                        <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                      </scg:Dictionary>
                                    </sap:WorkflowViewStateService.ViewState>
                                    <Assign sap:VirtualizedContainerService.HintSize="464,60" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                      <Assign.To>
                                        <OutArgument x:TypeArguments="x:Int32">[NumberOfFailedBuilds]</OutArgument>
                                      </Assign.To>
                                      <Assign.Value>
                                        <InArgument x:TypeArguments="x:Int32">[NumberOfFailedBuilds + 1]</InArgument>
                                      </Assign.Value>
                                    </Assign>
                                    <mtbwa:WriteBuildMessage sap:VirtualizedContainerService.HintSize="464,22" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" Message="[String.Format(&quot;Build '{0}' failed. Error message: {1}&quot;, buildDefinitionName, exception.Message)]" mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces" />
                                    <If Condition="[StopOnFirstFailedBuild]" DisplayName="If Stop On First Failed Build" sap:VirtualizedContainerService.HintSize="464,254" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                      <If.Then>
                                        <Sequence sap:VirtualizedContainerService.HintSize="222,146" mtbwt1:BuildTrackingParticipant.Importance="Low">
                                          <sap:WorkflowViewStateService.ViewState>
                                            <scg:Dictionary x:TypeArguments="x:String, x:Object">
                                              <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                                            </scg:Dictionary>
                                          </sap:WorkflowViewStateService.ViewState>
                                          <Throw Exception="[New Exception(&quot;Stopping build due to option StopOnFirstFailedBuild=True.&quot;, exception)]" sap:VirtualizedContainerService.HintSize="200,22" mtbwt1:BuildTrackingParticipant.Importance="Low" />
                                        </Sequence>
                                      </If.Then>
                                    </If>
                                  </Sequence>
                                </ActivityAction>
                              </Catch>
                            </TryCatch.Catches>
                          </TryCatch>
                        </Sequence>
                      </ActivityAction>
                    </ForEach>
                  </Sequence>
                </If.Else>
              </If>
            </If.Then>
            <If.Else>
              <mtbwa:WriteBuildError sap:VirtualizedContainerService.HintSize="200,22" Message="No builds were specified." />
            </If.Else>
          </If>
        </TryCatch.Try>
        <TryCatch.Catches>
          <Catch x:TypeArguments="s:Exception" sap:VirtualizedContainerService.HintSize="2204,241">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">False</x:Boolean>
                <x:Boolean x:Key="IsPinned">False</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <ActivityAction x:TypeArguments="s:Exception">
              <ActivityAction.Argument>
                <DelegateInArgument x:TypeArguments="s:Exception" Name="outerException" />
              </ActivityAction.Argument>
              <Sequence sap:VirtualizedContainerService.HintSize="222,208" mtbwt1:BuildTrackingParticipant.Importance="Low">
                <sap:WorkflowViewStateService.ViewState>
                  <scg:Dictionary x:TypeArguments="x:String, x:Object">
                    <x:Boolean x:Key="IsExpanded">True</x:Boolean>
                  </scg:Dictionary>
                </sap:WorkflowViewStateService.ViewState>
                <mtbwa:SetBuildProperties sap:VirtualizedContainerService.HintSize="200,22" mtbwt1:BuildTrackingParticipant.Importance="Low" PropertiesToSet="Status" Status="[BuildStatus.Failed]" />
                <mtbwa:WriteBuildError sap:VirtualizedContainerService.HintSize="200,22" Message="[outerException.Message]" />
              </Sequence>
            </ActivityAction>
          </Catch>
        </TryCatch.Catches>
        <TryCatch.Finally>
          <Sequence sap:VirtualizedContainerService.HintSize="486,394" mtbwt1:BuildTrackingParticipant.Importance="Low">
            <sap:WorkflowViewStateService.ViewState>
              <scg:Dictionary x:TypeArguments="x:String, x:Object">
                <x:Boolean x:Key="IsExpanded">True</x:Boolean>
              </scg:Dictionary>
            </sap:WorkflowViewStateService.ViewState>
            <If Condition="[NumberOfFailedBuilds &gt; 0]" DisplayName="If There Were Failed Builds" sap:VirtualizedContainerService.HintSize="464,208" mtbwt1:BuildTrackingParticipant.Importance="Low">
              <If.Then>
                <mtbwa:SetBuildProperties sap:VirtualizedContainerService.HintSize="200,22" mtbwt1:BuildTrackingParticipant.Importance="Low" PropertiesToSet="Status" Status="[BuildStatus.Failed]" />
              </If.Then>
            </If>
            <mtlwa:WriteDeploymentInformation Url="{x:Null}" DeploymentInformationType="Builds" sap:VirtualizedContainerService.HintSize="464,22" Message="[String.Format(&quot;Finished running {0} builds. {1} failed.&quot;, If(Not (BuildsToRun Is Nothing) AndAlso BuildsToRun.Length &gt; 0, BuildsToRun.Length, 0), NumberOfFailedBuilds)]" />
          </Sequence>
        </TryCatch.Finally>
      </TryCatch>
    </mtbwa:AgentScope>
    <mtbwa:InvokeForReason DisplayName="Check In Gated Changes for CheckInShelveset Builds" sap:VirtualizedContainerService.HintSize="2240,146" Reason="CheckInShelveset">
      <sap:WorkflowViewStateService.ViewState>
        <scg:Dictionary x:TypeArguments="x:String, x:Object">
          <x:Boolean x:Key="IsPinned">False</x:Boolean>
          <x:Boolean x:Key="IsExpanded">False</x:Boolean>
        </scg:Dictionary>
      </sap:WorkflowViewStateService.ViewState>
      <mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" sap:VirtualizedContainerService.HintSize="200,22" />
    </mtbwa:InvokeForReason>
  </Sequence>
</Activity>